<?php


namespace app\api\controller;
use \app\api\model\User as UserModel;

use think\Controller;
use think\Request;

class User extends Controller
{
    protected $middleware = ['Auth'];

    /**
     * 我的信息
     */
    public function myinfo(Request $request){
        $userId = $request->userId;
        $groupId = $request->groupId;
        $result = UserModel::queryByUserId($userId,$groupId);
        if($result){
            return  success($result);
        }else{
            return  fail(DATA_NOT_EXIST, '查询失败');
        }
    }
}